<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@page import="br.com.academia.dao.ContatoDAO"%>
<%@page import="br.com.academia.modelo.Contato"%>
<%@page import="org.apache.jasper.tagplugins.jstl.core.ForEach"%>
<%@page import="java.util.ArrayList"%>
<%@page import="br.com.academia.dao.UsuarioDAO"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<!-- 	CSS -->
<style type="text/css" media="screen">
@import url('../css/padrao.css');

@import url('../css/form.css');
</style>
<!-- 	Fim CSS -->
<title>Academia</title>
</head>
<body>
	<div id="tudo">
		<div id="conteudo">
			<%@include file="../blocks/menu.jsp"%>

			<div id="principal">
					<form id="form" method="post" action="/academia/ContatoAlterar">
						<h2 align="center">Contato</h2>
						<%
							int id = Integer.parseInt(request.getParameter("id"));
							Contato contato = new Contato();
							contato.setIdcontato(id);
										
							ContatoDAO dao = new ContatoDAO();
							contato = dao.consultar(contato);
						%>
						<input type="hidden" name="id" value="<%=id%>" /> 
						
						<label>Nome:</label>
						<input type="text" name="nome" value="<%=contato.getNome()%>" /> 
						<label>Email:</label>
						<input type="text" class="input" name="email" value="<%=contato.getEmail()%>" /> 
						<label>Mensagem:</label>
						<textarea class="input textarea" name="mensagem"><%=contato.getMensagem()%></textarea>

						<input type="submit" name="Submit" class="button" value="Salvar" />
					</form>
			</div>

			<div id="auxiliar">
				<%@include file="../blocks/login.jsp"%>
			</div>
		</div>
		<%@include file="../blocks/rodape.jsp"%>
	</div>
</body>
</html>